home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / al.zip / ALOW.ASM next >
Assembly Source File  |  1993-01-02  |  3KB  |  76 lines

  1. _TEXT SEGMENT WORD PUBLIC 'CODE'
  2.            ORG 100H
  3.  
  4. INIT       PROC NEAR
  5.            ASSUME CS:_TEXT,DS:_TEXT,es:nothing
  6.            mov  es,es:[02ch]          ; release environment
  7.            mov  ah,49h
  8.            int  21h
  9.            call INITIALIZE            ; setup our handler
  10.            mov  dx,((offset progam_end+16)/16)+10h   ; Size of block to alloc
  11.            mov  ax,3100h              ; term. & stay resident
  12.            int  21h
  13. INIT       ENDP
  14.  
  15.  
  16. INT10      PROC FAR
  17.            sti                        ; Enable Ints, so not to slow clock
  18.            pushf                      ; Save the flags b4 compare
  19.            cmp  ah,09h                ; See if Screen output function
  20.            jb   bios_op
  21.            je   our_op
  22.            cmp  ah,0Ah
  23.            je   our_op
  24.            cmp  ah,0Eh
  25.            je   our_op
  26.            jmp  short bios_op
  27.  our_op:                              ; Yes, Screen output
  28.            cmp  al,91d
  29.            jae  bios_op               ; if lowercase then do nothing
  30.            cmp  al,64d                ; Is it lowercase
  31.            ja   point_to_table        ; Yes, it is lowercase
  32.            jmp  short bios_op         ; No, it is not lowercase
  33. point_to_table:
  34.            push ax
  35.            mov  ah,32d                ;  Make it lowercase
  36.            add  al,ah
  37.            mov  cs:dch,al
  38.            pop  ax
  39.            mov  al,cs:dch
  40. bios_op:                              ; Restore orginal flags
  41.            popf                       ; Put them back on the stack
  42.            pushf
  43.            call cs:int10_ptr          ; call orginal handler
  44.            iret                       ; return to caller
  45.  
  46. int10_ptr  equ this dword             ; Old INT 10H pointer
  47. int10_ofs    dw ?                     ; Old INT 10H Offset
  48. int10_seg    dw ?                     ; Old INT 10H Segment
  49. dch          db ?                     ; Temp. Var.
  50. INT10      ENDP
  51.  
  52.  
  53. progam_end  equ  $-init               ; Do not alloc routine below
  54.                                       ; to save memory
  55.  
  56. INITIALIZE  PROC NEAR
  57.             mov  dx,offset intro1
  58.             mov  ah,9
  59.             int  21h
  60.             mov  ax,3510h
  61.             int  21h
  62.             mov  int10_ofs,bx
  63.             mov  int10_seg,es
  64.             mov  ax,2510h
  65.             mov  dx,offset int10
  66.             int  21h
  67.             ret
  68. intro1  db  13,10,'DOS All LowerCase Rev.C,(C)Copr.1992, By Mark Vitt',13,10,'$'
  69. INITIALIZE  ENDP
  70.  
  71. _TEXT ENDS
  72.       END INIT
  73.  
  74.  
  75.  
  76.